package com.yiya.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yiya.bean.PriceHistory;
import com.yiya.model.PriceHistoryCplex;
import com.yiya.model.PriceHistoryCplexModel;
import com.yiya.model.PriceHistoryExample;

public interface PriceHistoryMapper {
    int countByExample(PriceHistoryExample example);

    int deleteByExample(PriceHistoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(PriceHistory record);

    int insertSelective(PriceHistory record);

    List<PriceHistory> selectByExample(PriceHistoryExample example);

    PriceHistory selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") PriceHistory record, @Param("example") PriceHistoryExample example);

    int updateByExample(@Param("record") PriceHistory record, @Param("example") PriceHistoryExample example);

    int updateByPrimaryKeySelective(PriceHistory record);

    int updateByPrimaryKey(PriceHistory record);
    
    /**
     * 获取历史报价信息
     * @param record
     * @return
     */
    List<PriceHistoryCplex> selectByModel(PriceHistoryCplexModel record);
    
    /**
     * 获取历史报价记录数量
     * @param record
     * @return
     */
    int countByModel(PriceHistoryCplexModel record);
}